#define _CRT_SECURE_NO_WARNINGS
#include<stdio.h>
#include <string.h>
#include<assert.h>
void f(int arr[],int sz)
{
	int left = 0;      
	int right = sz - 1;
	while (left < right)
	{
		if (arr[left] % 2 == 0)
		{
			if (arr[right] % 2 != 0)
			{
				int tem = arr[right];
				arr[right] = arr[left];
				arr[left] = tem;
			}
			else
				right--;
		}
		else
			left++;
	}
}
int main()
{
	int a[7] = { 0 };
	int i = 0;
	for (i = 0; i < 7; i++)
	{
		a[i] = rand();
	}
	f(a, 7);
	return 0;
}